/*
 * @Author: C.
 * @Date: 2024-04-16 16:49:06
 */
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
// 查询公告列表
export function listBook(query: Recordable): AxiosPromise<Recordable[]> {
  return request({
    url: '/speak/book/list',
    method: 'get',
    params: query,
  });
}

// 查询公告详细
export function getBook(BookId: string | number): AxiosPromise<Recordable> {
  return request({
    url: '/speak/book/' + BookId,
    method: 'get',
  });
}

// 新增公告
export function addBook(data: Recordable) {
  return request({
    url: '/speak/book',
    method: 'post',
    data: data,
  });
}

// 修改公告
export function updateBook(data: Recordable) {
  return request({
    url: '/speak/book',
    method: 'put',
    data: data,
  });
}

// 删除公告
export function delBook(BookId: string | number | Array<string | number>) {
  return request({
    url: '/speak/book/' + BookId,
    method: 'delete',
  });
}
